import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import "@/assets/global.css"

// 创建 Vue 应用实例
const app = createApp(App)

// 注册所有 Element Plus 图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 使用 ElementPlus，并设置中文语言包
app.use(ElementPlus, {
  locale: zhCn,
})

// 挂载其他插件
app.use(store)
app.use(router)

// 挂载到 #app
app.mount('#app')